/*
vue 插件:注册项目所有的全局组件
v2和v3不一样
1 整体写法不变
2 v3的install方法的第一参数发生变化
*/
import Skeleton from './skeleton'
import Silder from './silder/index.vue'
import More from './more/index.vue'
import Bread from './bread/index.vue'
import BreadItem from './bread/item.vue'
import InfintieLoad from './infintieLoad/index.vue'
import City from './city/index.vue'
import Sku from './Sku/index.vue'
import Numbox from './Numbox/index.vue'
import Button from './button/index.vue'
import CheckBox from './checkBox/index.vue'
import Message from './message/index.vue'
const cps = [Skeleton, Silder, More, Bread, BreadItem, InfintieLoad, City, Sku, Numbox, Button, CheckBox, Message]

export default {
  /*
  install(app){
console.log(app);
手动注册
 app.component('skeleton',skeleton,)
  }
   */
  // 循环注册 =.推荐使用  一般用组件的name属性当值
  install (app) {
    cps.forEach(cp => {
      app.component(cp.name, cp)
    })
  }
}
